package cn.test.service.impl;

import cn.test.annotation.NeedSetFiledValue;
import cn.test.entity.Order;
import cn.test.mapper.OrderMapper;
import cn.test.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderMapper orderMapper;

    // 使用注解定在需要的方法上
    @Override
    @NeedSetFiledValue
    public List<Order> getAllOrder() {
        List<Order> orderList = orderMapper.getAllOrder();
        return orderList;
    }
}
